package cn.chenhuanming.shh.administer.entity.jpa;

import javax.persistence.*;
import java.time.LocalDateTime;

import static javax.persistence.GenerationType.IDENTITY;

/**
 * InformationDispose entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "information_dispose", catalog = "house")
public class InformationDispose implements java.io.Serializable {

	// Fields

	private Integer id;
	private UserBroker userBroker;
	private District district;
	private String type;
	private String message;
	private String messageType;
	private String provinceName;
	private String city;
	private String cityArea;
	private String contactName;
	private String contactPhone;
	private LocalDateTime time;
	private String disposeStatus;
	private String disposePeople;
	private LocalDateTime disposeTime;
	private String status;

	// Constructors

	/** default constructor */
	public InformationDispose() {
	}

	/** minimal constructor */
	public InformationDispose(String type, String message, String messageType,
			String contactName, String contactPhone, LocalDateTime time,
			String disposeStatus, String status) {
		this.type = type;
		this.message = message;
		this.messageType = messageType;
		this.contactName = contactName;
		this.contactPhone = contactPhone;
		this.time = time;
		this.disposeStatus = disposeStatus;
		this.status = status;
	}

	/** full constructor */
	public InformationDispose(UserBroker userBroker, District district,
			String type, String message, String messageType,
			String provinceName, String city, String cityArea,
			String contactName, String contactPhone, LocalDateTime time,
			String disposeStatus, String disposePeople,
			LocalDateTime disposeTime, String status) {
		this.userBroker = userBroker;
		this.district = district;
		this.type = type;
		this.message = message;
		this.messageType = messageType;
		this.provinceName = provinceName;
		this.city = city;
		this.cityArea = cityArea;
		this.contactName = contactName;
		this.contactPhone = contactPhone;
		this.time = time;
		this.disposeStatus = disposeStatus;
		this.disposePeople = disposePeople;
		this.disposeTime = disposeTime;
		this.status = status;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "dispose_man")
	public UserBroker getUserBroker() {
		return this.userBroker;
	}

	public void setUserBroker(UserBroker userBroker) {
		this.userBroker = userBroker;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "city_area_id")
	public District getDistrict() {
		return this.district;
	}

	public void setDistrict(District district) {
		this.district = district;
	}

	@Column(name = "type", nullable = false, length = 7)
	public String getType() {
		return this.type;
	}

	public void setType(String type) {
		this.type = type;
	}

	@Column(name = "message", nullable = false)
	public String getMessage() {
		return this.message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	@Column(name = "message_type", nullable = false, length = 3)
	public String getMessageType() {
		return this.messageType;
	}

	public void setMessageType(String messageType) {
		this.messageType = messageType;
	}

	@Column(name = "province_name")
	public String getProvinceName() {
		return this.provinceName;
	}

	public void setProvinceName(String provinceName) {
		this.provinceName = provinceName;
	}

	@Column(name = "city", length = 20)
	public String getCity() {
		return this.city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	@Column(name = "city_area", length = 20)
	public String getCityArea() {
		return this.cityArea;
	}

	public void setCityArea(String cityArea) {
		this.cityArea = cityArea;
	}

	@Column(name = "contact_name", nullable = false, length = 20)
	public String getContactName() {
		return this.contactName;
	}

	public void setContactName(String contactName) {
		this.contactName = contactName;
	}

	@Column(name = "contact_phone", nullable = false, length = 20)
	public String getContactPhone() {
		return this.contactPhone;
	}

	public void setContactPhone(String contactPhone) {
		this.contactPhone = contactPhone;
	}

	@Column(name = "time", nullable = false, length = 19)
	public LocalDateTime getTime() {
		return this.time;
	}

	public void setTime(LocalDateTime time) {
		this.time = time;
	}

	@Column(name = "dispose_status", nullable = false, length = 4)
	public String getDisposeStatus() {
		return this.disposeStatus;
	}

	public void setDisposeStatus(String disposeStatus) {
		this.disposeStatus = disposeStatus;
	}

	@Column(name = "dispose_people", length = 20)
	public String getDisposePeople() {
		return this.disposePeople;
	}

	public void setDisposePeople(String disposePeople) {
		this.disposePeople = disposePeople;
	}

	@Column(name = "dispose_time", length = 19)
	public LocalDateTime getDisposeTime() {
		return this.disposeTime;
	}

	public void setDisposeTime(LocalDateTime disposeTime) {
		this.disposeTime = disposeTime;
	}

	@Column(name = "status", nullable = false, length = 3)
	public String getStatus() {
		return this.status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

}